{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 皮马印第安人糖尿病分类练习"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 数据集为皮马印第安人5年内发病情况，输出值为0和1，共8个输入变量和1个输出变量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入相应模块\n",
    "import pandas as pd \n",
    "import numpy as np\n",
    "#模型选择，GridSearchCV 网格搜索 ，GridSearchCV用于系统地遍历多种参数组合，通过交叉验证确定最佳效果参数\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "\n",
    "#模型评价指标为logloss\n",
    "from sklearn.metrics import log_loss  \n",
    "\n",
    "from matplotlib import pyplot\n",
    "import seaborn as sns\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 读取数据&数据探索"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Pregnancies</th>\n",
       "      <th>Glucose</th>\n",
       "      <th>BloodPressure</th>\n",
       "      <th>SkinThickness</th>\n",
       "      <th>Insulin</th>\n",
       "      <th>BMI</th>\n",
       "      <th>DiabetesPedigreeFunction</th>\n",
       "      <th>Age</th>\n",
       "      <th>Outcome</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>6</td>\n",
       "      <td>148</td>\n",
       "      <td>72</td>\n",
       "      <td>35</td>\n",
       "      <td>0</td>\n",
       "      <td>33.6</td>\n",
       "      <td>0.627</td>\n",
       "      <td>50</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>85</td>\n",
       "      <td>66</td>\n",
       "      <td>29</td>\n",
       "      <td>0</td>\n",
       "      <td>26.6</td>\n",
       "      <td>0.351</td>\n",
       "      <td>31</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>8</td>\n",
       "      <td>183</td>\n",
       "      <td>64</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>23.3</td>\n",
       "      <td>0.672</td>\n",
       "      <td>32</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>89</td>\n",
       "      <td>66</td>\n",
       "      <td>23</td>\n",
       "      <td>94</td>\n",
       "      <td>28.1</td>\n",
       "      <td>0.167</td>\n",
       "      <td>21</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>137</td>\n",
       "      <td>40</td>\n",
       "      <td>35</td>\n",
       "      <td>168</td>\n",
       "      <td>43.1</td>\n",
       "      <td>2.288</td>\n",
       "      <td>33</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Pregnancies  Glucose  BloodPressure  SkinThickness  Insulin   BMI  \\\n",
       "0            6      148             72             35        0  33.6   \n",
       "1            1       85             66             29        0  26.6   \n",
       "2            8      183             64              0        0  23.3   \n",
       "3            1       89             66             23       94  28.1   \n",
       "4            0      137             40             35      168  43.1   \n",
       "\n",
       "   DiabetesPedigreeFunction  Age  Outcome  \n",
       "0                     0.627   50        1  \n",
       "1                     0.351   31        0  \n",
       "2                     0.672   32        1  \n",
       "3                     0.167   21        0  \n",
       "4                     2.288   33        1  "
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train = pd.read_csv(\"C:/Users/dell/Desktop/ai/two-week/homework/1/diabetes.csv\")\n",
    "#获取前5行数据预览下\n",
    "train.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(768, 9)"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train.shape\n",
    "#共768个样本，8个输入变量 ，1个输出变量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 768 entries, 0 to 767\n",
      "Data columns (total 9 columns):\n",
      "Pregnancies                 768 non-null int64\n",
      "Glucose                     768 non-null int64\n",
      "BloodPressure               768 non-null int64\n",
      "SkinThickness               768 non-null int64\n",
      "Insulin                     768 non-null int64\n",
      "BMI                         768 non-null float64\n",
      "DiabetesPedigreeFunction    768 non-null float64\n",
      "Age                         768 non-null int64\n",
      "Outcome                     768 non-null int64\n",
      "dtypes: float64(2), int64(7)\n",
      "memory usage: 54.1 KB\n"
     ]
    }
   ],
   "source": [
    "train.info()\n",
    "#数据无空值，其中BMI和DiabetesPedigreeFunction为浮点型数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Pregnancies</th>\n",
       "      <th>Glucose</th>\n",
       "      <th>BloodPressure</th>\n",
       "      <th>SkinThickness</th>\n",
       "      <th>Insulin</th>\n",
       "      <th>BMI</th>\n",
       "      <th>DiabetesPedigreeFunction</th>\n",
       "      <th>Age</th>\n",
       "      <th>Outcome</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>count</th>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "      <td>768.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>mean</th>\n",
       "      <td>3.845052</td>\n",
       "      <td>120.894531</td>\n",
       "      <td>69.105469</td>\n",
       "      <td>20.536458</td>\n",
       "      <td>79.799479</td>\n",
       "      <td>31.992578</td>\n",
       "      <td>0.471876</td>\n",
       "      <td>33.240885</td>\n",
       "      <td>0.348958</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>std</th>\n",
       "      <td>3.369578</td>\n",
       "      <td>31.972618</td>\n",
       "      <td>19.355807</td>\n",
       "      <td>15.952218</td>\n",
       "      <td>115.244002</td>\n",
       "      <td>7.884160</td>\n",
       "      <td>0.331329</td>\n",
       "      <td>11.760232</td>\n",
       "      <td>0.476951</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>min</th>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.078000</td>\n",
       "      <td>21.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25%</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>99.000000</td>\n",
       "      <td>62.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>27.300000</td>\n",
       "      <td>0.243750</td>\n",
       "      <td>24.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50%</th>\n",
       "      <td>3.000000</td>\n",
       "      <td>117.000000</td>\n",
       "      <td>72.000000</td>\n",
       "      <td>23.000000</td>\n",
       "      <td>30.500000</td>\n",
       "      <td>32.000000</td>\n",
       "      <td>0.372500</td>\n",
       "      <td>29.000000</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>75%</th>\n",
       "      <td>6.000000</td>\n",
       "      <td>140.250000</td>\n",
       "      <td>80.000000</td>\n",
       "      <td>32.000000</td>\n",
       "      <td>127.250000</td>\n",
       "      <td>36.600000</td>\n",
       "      <td>0.626250</td>\n",
       "      <td>41.000000</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>max</th>\n",
       "      <td>17.000000</td>\n",
       "      <td>199.000000</td>\n",
       "      <td>122.000000</td>\n",
       "      <td>99.000000</td>\n",
       "      <td>846.000000</td>\n",
       "      <td>67.100000</td>\n",
       "      <td>2.420000</td>\n",
       "      <td>81.000000</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       Pregnancies     Glucose  BloodPressure  SkinThickness     Insulin  \\\n",
       "count   768.000000  768.000000     768.000000     768.000000  768.000000   \n",
       "mean      3.845052  120.894531      69.105469      20.536458   79.799479   \n",
       "std       3.369578   31.972618      19.355807      15.952218  115.244002   \n",
       "min       0.000000    0.000000       0.000000       0.000000    0.000000   \n",
       "25%       1.000000   99.000000      62.000000       0.000000    0.000000   \n",
       "50%       3.000000  117.000000      72.000000      23.000000   30.500000   \n",
       "75%       6.000000  140.250000      80.000000      32.000000  127.250000   \n",
       "max      17.000000  199.000000     122.000000      99.000000  846.000000   \n",
       "\n",
       "              BMI  DiabetesPedigreeFunction         Age     Outcome  \n",
       "count  768.000000                768.000000  768.000000  768.000000  \n",
       "mean    31.992578                  0.471876   33.240885    0.348958  \n",
       "std      7.884160                  0.331329   11.760232    0.476951  \n",
       "min      0.000000                  0.078000   21.000000    0.000000  \n",
       "25%     27.300000                  0.243750   24.000000    0.000000  \n",
       "50%     32.000000                  0.372500   29.000000    0.000000  \n",
       "75%     36.600000                  0.626250   41.000000    1.000000  \n",
       "max     67.100000                  2.420000   81.000000    1.000000  "
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#各属性统计特性\n",
    "train.describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0,0.5,'Number of occurrences')"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAEKCAYAAAAIO8L1AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAE+JJREFUeJzt3X+0ZWV93/H3BwbUoHH4MbIow2SwjmnJUpGMFEOrEW0q2jJIxcSyZIKzOsmqURLS1NGkksTYaCJiqC3trGAYLIUgFRmUxkxHwBUTKDMoIKJlpARmYZkB+aUULPDtH+e5cBj23LtnhnPP4d73a62zzt7Pefa53+sa7se9n72fJ1WFJEk72mvcBUiSJpMBIUnqZEBIkjoZEJKkTgaEJKmTASFJ6mRASJI6GRCSpE4GhCSp04JxF7AnDjr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8/BlyT5EbgU63PB4DTktwEvIenxyb61LUd+GXgonb8tcDf293fU9odzuYqSerkGYQkqZMBIUnqZEBIkjoZEJKkTgaEJKmTASFJ6mRASJI6GRCSpE7/H6faJrOoDn8hAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23d8116a6d8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#查看Outcome 输出类别是否均衡\n",
    "sns.countplot(train.Outcome);\n",
    "pyplot.xlabel('Outcome');\n",
    "pyplot.ylabel('Number of occurrences')\n",
    "#没出现糖尿病的样本数占比比较大，占比65%左右，样本不均衡（需要使用样本权重及类别权重处理）"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 样本未出现类别特征，无需做类别特征转换"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据预处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "#由于没有测试数据，从样本数据集中分离 20%作为测试集\n",
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "train_data = train.drop('Outcome',axis = 1)\n",
    "train_target = train['Outcome'].values\n",
    "\n",
    "X_train, X_test, y_train, y_test = train_test_split(\n",
    "train_data, train_target, test_size=0.2, random_state=0)\n",
    "columns = X_train.columns\n",
    "\n",
    "#X_test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "#数据标准化处理\n",
    "from sklearn.preprocessing import StandardScaler\n",
    "\n",
    "#初始化特征标准器\n",
    "ss_X = StandardScaler()\n",
    "\n",
    "#对样本数据集进行标准化\n",
    "X_train = ss_X.fit_transform(X_train)\n",
    "X_test = ss_X.fit_transform(X_test)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 模型训练"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## default logistic regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "#导入sklearn 中Logistic回归模块\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "lr = LogisticRegression()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "logloss of each fold is:  [0.50641233 0.45398684 0.47245305 0.58502473 0.46968588]\n",
      "cv logloss is: 0.49751256558230594\n"
     ]
    }
   ],
   "source": [
    "#使用交叉验证评估模型性能及参数调优\n",
    "from sklearn.model_selection import cross_val_score\n",
    "#sklearn.cross_validation.cross_val_score(estimator, X, y=None, scoring=None, cv=None,n_jobs=1\n",
    "#, verbose=0, fit_params=None, pre_dispatch='2*n_jobs')\n",
    "#estimator：是不同的分类器,scoring:准确率的算法，cv代表交叉验证的算法\n",
    "loss = cross_val_score(lr, X_train, y_train, cv=5, scoring='neg_log_loss')\n",
    "#打印准确率\n",
    "print ('logloss of each fold is: ',-loss)\n",
    "print ('cv logloss is:', -loss.mean())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 加入正则后的LogisticRegression及参数调优和参数选择评价"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "GridSearchCV(cv=5, error_score='raise',\n",
       "       estimator=LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,\n",
       "          intercept_scaling=1, max_iter=100, multi_class='ovr', n_jobs=1,\n",
       "          penalty='l2', random_state=None, solver='liblinear', tol=0.0001,\n",
       "          verbose=0, warm_start=False),\n",
       "       fit_params=None, iid=True, n_jobs=1,\n",
       "       param_grid={'penalty': ['l1', 'l2'], 'C': [0.001, 0.01, 0.1, 1, 10, 100, 1000]},\n",
       "       pre_dispatch='2*n_jobs', refit=True, return_train_score='warn',\n",
       "       scoring='roc_auc', verbose=0)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "#GridSearnCV说明\n",
    "#classsklearn.model_selection.GridSearchCV(estimator,param_grid, scoring=None\n",
    "#, fit_params=None, n_jobs=1, iid=True, refit=True,cv=None, verbose=0,\n",
    "#pre_dispatch='2*n_jobs', error_score='raise',return_train_score=True)\n",
    "#param_grid:值为字典或者列表，即需要最优化的参数的取值\n",
    "#scoring :准确度评价标准，默认None\n",
    "#cv:交叉验证参数，默认None，使用三折交叉验证。 k_fold ,可以指定，最小为2 \n",
    "#refit :默认为True,程序将会以交叉验证训练集得到的最佳参数，重新对所有可用的训练集与开发集进行，作为最终用于性能评估的最佳模型参数。\n",
    "#需要调优的参数\n",
    "#把参数存入字典 tuned_parameters\n",
    "penaltys = ['l1','l2']\n",
    "Cs = [0.001, 0.01, 0.1, 1, 10, 100, 1000]\n",
    "tuned_parameters = dict(penalty = penaltys, C = Cs)\n",
    "\n",
    "lr_penalty= LogisticRegression()\n",
    "#评价指标使用ROC试下\n",
    "grid = GridSearchCV(lr_penalty, tuned_parameters,cv=5, scoring='roc_auc')\n",
    "#grid= GridSearchCV(lr_penalty, tuned_parameters,cv=5, scoring='neg_log_loss')\n",
    "#进行预测的常用方法和属性\n",
    "#grid.fit()：运行网格搜索\n",
    "#grid_scores_：给出不同参数情况下的评价结果\n",
    "#best_params_：描述了已取得最佳结果的参数的组合\n",
    "#best_score_：成员提供优化过程期间观察到的最好的评分\n",
    "#cv_results_:选择参数的日志信息\n",
    "#运行网格搜索\n",
    "grid.fit(X_train,y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('mean_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "C:\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('split0_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "C:\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('split1_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "C:\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('split2_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "C:\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('split3_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "C:\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('split4_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "C:\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('std_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'mean_fit_time': array([0.        , 0.        , 0.00312772, 0.        , 0.00312815,\n",
       "        0.00312977, 0.00311852, 0.        , 0.        , 0.00312338,\n",
       "        0.00313077, 0.        , 0.        , 0.        ]),\n",
       " 'mean_score_time': array([0.        , 0.00312476, 0.        , 0.00312505, 0.        ,\n",
       "        0.        , 0.        , 0.        , 0.        , 0.        ,\n",
       "        0.        , 0.        , 0.        , 0.        ]),\n",
       " 'mean_test_score': array([0.5       , 0.8087478 , 0.78553876, 0.82216376, 0.82360189,\n",
       "        0.82698312, 0.82685584, 0.826394  , 0.82593134, 0.82587397,\n",
       "        0.82587397, 0.82581607, 0.82581607, 0.82581607]),\n",
       " 'mean_train_score': array([0.5       , 0.81370347, 0.78405935, 0.82680229, 0.82826878,\n",
       "        0.83265434, 0.83279656, 0.83271789, 0.83278628, 0.8327467 ,\n",
       "        0.8327107 , 0.83270346, 0.83269627, 0.83269272]),\n",
       " 'param_C': masked_array(data=[0.001, 0.001, 0.01, 0.01, 0.1, 0.1, 1, 1, 10, 10, 100,\n",
       "                    100, 1000, 1000],\n",
       "              mask=[False, False, False, False, False, False, False, False,\n",
       "                    False, False, False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'param_penalty': masked_array(data=['l1', 'l2', 'l1', 'l2', 'l1', 'l2', 'l1', 'l2', 'l1',\n",
       "                    'l2', 'l1', 'l2', 'l1', 'l2'],\n",
       "              mask=[False, False, False, False, False, False, False, False,\n",
       "                    False, False, False, False, False, False],\n",
       "        fill_value='?',\n",
       "             dtype=object),\n",
       " 'params': [{'C': 0.001, 'penalty': 'l1'},\n",
       "  {'C': 0.001, 'penalty': 'l2'},\n",
       "  {'C': 0.01, 'penalty': 'l1'},\n",
       "  {'C': 0.01, 'penalty': 'l2'},\n",
       "  {'C': 0.1, 'penalty': 'l1'},\n",
       "  {'C': 0.1, 'penalty': 'l2'},\n",
       "  {'C': 1, 'penalty': 'l1'},\n",
       "  {'C': 1, 'penalty': 'l2'},\n",
       "  {'C': 10, 'penalty': 'l1'},\n",
       "  {'C': 10, 'penalty': 'l2'},\n",
       "  {'C': 100, 'penalty': 'l1'},\n",
       "  {'C': 100, 'penalty': 'l2'},\n",
       "  {'C': 1000, 'penalty': 'l1'},\n",
       "  {'C': 1000, 'penalty': 'l2'}],\n",
       " 'rank_test_score': array([14, 12, 13, 11, 10,  1,  2,  3,  4,  5,  5,  7,  7,  7]),\n",
       " 'split0_test_score': array([0.5       , 0.75527426, 0.76132208, 0.78227848, 0.8       ,\n",
       "        0.80731364, 0.81097046, 0.81097046, 0.81125176, 0.81125176,\n",
       "        0.81125176, 0.81125176, 0.81125176, 0.81125176]),\n",
       " 'split0_train_score': array([0.5       , 0.82426173, 0.79212507, 0.83408729, 0.83493775,\n",
       "        0.83819485, 0.83754343, 0.837652  , 0.83768819, 0.83767009,\n",
       "        0.8376339 , 0.83759771, 0.83759771, 0.83761581]),\n",
       " 'split1_test_score': array([0.5       , 0.84579977, 0.83688147, 0.85788262, 0.86248562,\n",
       "        0.85903337, 0.85874568, 0.85817031, 0.85788262, 0.85788262,\n",
       "        0.85788262, 0.85788262, 0.85788262, 0.85788262]),\n",
       " 'split1_train_score': array([0.5       , 0.80252978, 0.77001691, 0.81690597, 0.81785958,\n",
       "        0.82455288, 0.82514664, 0.82503868, 0.82527259, 0.82516463,\n",
       "        0.82518263, 0.82516463, 0.82516463, 0.82516463]),\n",
       " 'split2_test_score': array([0.5       , 0.82278481, 0.76711738, 0.84033372, 0.83429229,\n",
       "        0.84464902, 0.84205984, 0.84119678, 0.83975834, 0.83918297,\n",
       "        0.83918297, 0.83918297, 0.83918297, 0.83918297]),\n",
       " 'split2_train_score': array([0.5       , 0.81030264, 0.78767678, 0.82304149, 0.82437295,\n",
       "        0.82888913, 0.82811544, 0.82831336, 0.82834935, 0.82831336,\n",
       "        0.82818741, 0.82820541, 0.82818741, 0.82818741]),\n",
       " 'split3_test_score': array([0.5       , 0.7983683 , 0.76500583, 0.79254079, 0.78205128,\n",
       "        0.78059441, 0.77564103, 0.77418415, 0.77301865, 0.77331002,\n",
       "        0.77331002, 0.77301865, 0.77301865, 0.77301865]),\n",
       " 'split3_train_score': array([0.5       , 0.8207515 , 0.78840463, 0.83705497, 0.83786208,\n",
       "        0.84361941, 0.84369115, 0.84388844, 0.84388844, 0.84383463,\n",
       "        0.84383463, 0.84385257, 0.84383463, 0.8438167 ]),\n",
       " 'split4_test_score': array([0.5       , 0.8219697 , 0.79749417, 0.83799534, 0.83916084,\n",
       "        0.84324009, 0.8467366 , 0.84731935, 0.84761072, 0.84761072,\n",
       "        0.84761072, 0.84761072, 0.84761072, 0.84761072]),\n",
       " 'split4_train_score': array([0.5       , 0.81067169, 0.78207336, 0.82292171, 0.82631154,\n",
       "        0.82801542, 0.82948614, 0.82869698, 0.82873285, 0.82875078,\n",
       "        0.82871491, 0.82869698, 0.82869698, 0.82867904]),\n",
       " 'std_fit_time': array([0.        , 0.        , 0.00625544, 0.        , 0.00625629,\n",
       "        0.00625954, 0.00623703, 0.        , 0.        , 0.00624676,\n",
       "        0.00626154, 0.        , 0.        , 0.        ]),\n",
       " 'std_score_time': array([0.        , 0.00624952, 0.        , 0.0062501 , 0.        ,\n",
       "        0.        , 0.        , 0.        , 0.        , 0.        ,\n",
       "        0.        , 0.        , 0.        , 0.        ]),\n",
       " 'std_test_score': array([0.        , 0.03079129, 0.0287517 , 0.02944755, 0.02879958,\n",
       "        0.02874931, 0.03001169, 0.03037827, 0.0305944 , 0.03044311,\n",
       "        0.03044311, 0.03054314, 0.03054314, 0.03054314]),\n",
       " 'std_train_score': array([0.        , 0.00783276, 0.00772214, 0.00755418, 0.00726452,\n",
       "        0.00710296, 0.00682082, 0.00698089, 0.00692617, 0.00693241,\n",
       "        0.00694375, 0.00694802, 0.00694459, 0.00694347])}"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#打印选择参数的日志信息\n",
    "grid.cv_results_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[mean: 0.50000, std: 0.00000, params: {'C': 0.001, 'penalty': 'l1'}, mean: 0.80875, std: 0.03070, params: {'C': 0.001, 'penalty': 'l2'}, mean: 0.78554, std: 0.02873, params: {'C': 0.01, 'penalty': 'l1'}, mean: 0.82216, std: 0.02941, params: {'C': 0.01, 'penalty': 'l2'}, mean: 0.82360, std: 0.02882, params: {'C': 0.1, 'penalty': 'l1'}, mean: 0.82698, std: 0.02878, params: {'C': 0.1, 'penalty': 'l2'}, mean: 0.82686, std: 0.03006, params: {'C': 1, 'penalty': 'l1'}, mean: 0.82639, std: 0.03043, params: {'C': 1, 'penalty': 'l2'}, mean: 0.82593, std: 0.03065, params: {'C': 10, 'penalty': 'l1'}, mean: 0.82587, std: 0.03050, params: {'C': 10, 'penalty': 'l2'}, mean: 0.82587, std: 0.03050, params: {'C': 100, 'penalty': 'l1'}, mean: 0.82582, std: 0.03060, params: {'C': 100, 'penalty': 'l2'}, mean: 0.82582, std: 0.03060, params: {'C': 1000, 'penalty': 'l1'}, mean: 0.82582, std: 0.03060, params: {'C': 1000, 'penalty': 'l2'}]\n",
      "0.8269831188387656\n",
      "{'C': 0.1, 'penalty': 'l2'}\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Anaconda3\\lib\\site-packages\\sklearn\\model_selection\\_search.py:761: DeprecationWarning: The grid_scores_ attribute was deprecated in version 0.18 in favor of the more elaborate cv_results_ attribute. The grid_scores_ attribute will not be available from 0.20\n",
      "  DeprecationWarning)\n"
     ]
    }
   ],
   "source": [
    "#查看最有参数及评价\n",
    "print(grid.grid_scores_)\n",
    "print(grid.best_score_)\n",
    "print(grid.best_params_)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 最佳参数在候选参数边缘，考虑增大候选参数范围，找到最佳参数拐点"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('mean_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n",
      "C:\\Anaconda3\\lib\\site-packages\\sklearn\\utils\\deprecation.py:122: FutureWarning: You are accessing a training score ('std_train_score'), which will not be available by default any more in 0.21. If you need training scores, please set return_train_score=True\n",
      "  warnings.warn(*warn_args, **warn_kwargs)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3Xl8lPW99//XZyYbkAQihDUkAQyi7BIBBbWu4FIVOSq2Vut9WnruI7X1nGO309sF2/70WO/axd9x4Whta4tWq0VEsFQtmwgB2RGEQBYWg2xJgGwzn/uPuRKGMGGyXVwzyef5eMwj1/Wd7zXzvliuT67te4mqYowxxpyJz+sAxhhjYp8VC2OMMVFZsTDGGBOVFQtjjDFRWbEwxhgTlRULY4wxUVmxMMYYE5UVC2OMMVFZsTDGGBNVgtcB2kuvXr00NzfX6xjGGBNX1qxZ84WqZkbr12GKRW5uLgUFBV7HMMaYuCIiRc3pZ4ehjDHGRGXFwhhjTFRWLIwxxkRlxcIYY0xUViyMMcZEZcXCGGNMVFYsjDHGRGXFwhhjTFSuFgsRmSoi20Rkh4j8IML72SLygYh8IiIbROR6pz1XRE6IyDrn9aybOY1x04SXpjPhpelex2gXdzz3EXc895HXMYwHXLuDW0T8wDPANUApsFpE5qnqlrBuPwZeU9X/FpELgAVArvPeTlUd41Y+E9vuXXgvAC9NfcnjJCbc7qSfO1NveJqjreqL98f3xvd6wNlbFzf3LMYDO1S1UFVrgLnAzY36KJDuTHcH9rqYxxhjTCu5OTbUAKAkbL4UmNCozyPAeyLybaAbcHXYe4NE5BOgHPixqi51MWuH0JF+G9+yr9zrCM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MMcZEZcXCGGNMVFYsjDHGRGXFwpgWEJHK6L3OuPzrIjLYmU4VkedEZKczYugSEZkgIknOdKe6adbENisWxpwlIjIc8KtqodM0h9DAfHmqOhz4OtDLGXTw78AdngQ1JgIrFsa0goQ86YxhtVFE7nDafSLy/zt7CvNFZIGI/JOz2FeBvzr9hgATgB+rahDAGZ32HafvW05/Y2KC7eYa0zq3AmOA0YTuaF4tIkuASUAuMBLoTWj46xedZSYBf3KmhxO6Gz3QxOdvAi5yJbkxrWB7Fsa0zmTgT86In58D/yC0cZ8M/FlVg6q6H/ggbJl+wIHmfLhTRGqch/MY4zkrFsa0TqThx8/UDnACSHGmNwOjReRM/weTgapWZDOm3VmxMKZ1lgB3OA+eyQQuA1YReqzldOfcRR9CA+/V2wqcC6CqO4EC4FFnFFREJK/+GR4i0hM4oKq1Z2uFjDkTKxbGtM6bwAZgPfA+8D3nsNMbhJ5jsYnQc8M/Bo46y7zDqcXjG0BfYIeIbARe4OTzLq4A4m4UVNNx2aizxrQzEUlV1Upn72AVMElV9zvPG/jAmW/qxHb9Z/wF+GEcP3/cdDB2NZQx7W++80CaJOAxZ48DVT0hIg8Teg53cVMLOw9KessKhYkltmdhjDEmKjtnYYwxJiorFsYYY6KyYmGMMSYqKxbGGGOismJhjDEmKisWxhhjovp/Seb4/9Xn30AAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23d850e1f98>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#参数选择生成的日志图表展示\n",
    "# CV误差曲线均值及方差\n",
    "test_means = grid.cv_results_[ 'mean_test_score' ]\n",
    "test_stds = grid.cv_results_[ 'std_test_score' ]\n",
    "train_means = grid.cv_results_[ 'mean_train_score' ]\n",
    "train_stds = grid.cv_results_[ 'std_train_score' ]\n",
    "\n",
    "# plot results\n",
    "n_Cs = len(Cs)\n",
    "number_penaltys = len(penaltys)\n",
    "test_scores = np.array(test_means).reshape(n_Cs,number_penaltys)\n",
    "train_scores = np.array(train_means).reshape(n_Cs,number_penaltys)\n",
    "test_stds = np.array(test_stds).reshape(n_Cs,number_penaltys)\n",
    "train_stds = np.array(train_stds).reshape(n_Cs,number_penaltys)\n",
    "\n",
    "x_axis = np.log10(Cs)\n",
    "#使用误差条显示各参数在不同条件加ROC评分结果\n",
    "for i, value in enumerate(penaltys):\n",
    "    pyplot.errorbar(x_axis, test_scores[:,i], yerr=test_stds[:,i] ,label = penaltys[i] +' Test')\n",
    "    pyplot.errorbar(x_axis, train_scores[:,i], yerr=train_stds[:,i] ,label = penaltys[i] +' Train')\n",
    "    \n",
    "pyplot.legend()\n",
    "pyplot.xlabel( 'log(C)' )                                                                                                      \n",
    "pyplot.ylabel( 'ROC' )\n",
    "pyplot.savefig('LogisticGridSearchCV_C.png' )\n",
    "\n",
    "pyplot.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 由上图可以看出最佳C 参数值为 0.1，L2比L1 评分稍微高一点"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用LogisticRegressionCV实现正则化,不同于GridSearchCV(只适用于数据量比较小的场合)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### L1正则"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LogisticRegressionCV(Cs=[0.001, 0.01, 0.1, 1, 10, 100, 1000],\n",
       "           class_weight='balanced', cv=5, dual=False, fit_intercept=True,\n",
       "           intercept_scaling=1.0, max_iter=100, multi_class='ovr',\n",
       "           n_jobs=1, penalty='l1', random_state=None, refit=True,\n",
       "           scoring='neg_log_loss', solver='liblinear', tol=0.0001,\n",
       "           verbose=0)"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#LogisticRegressionCV,\n",
    "from sklearn.linear_model import LogisticRegressionCV\n",
    "\n",
    "Cs = [0.001,0.01,0.1,1, 10,100,1000]\n",
    "#LogisticRegressionCV调用方法\n",
    "#LogisticRegressionCV(Cs=10, fit_intercept=True, cv=None, dual=False,\n",
    "#penalty=’l2’, scoring=None, solver=’lbfgs’, tol=0.0001, max_iter=100, \n",
    "#class_weight=None, n_jobs=1, verbose=0, refit=True, intercept_scaling=1.0,\n",
    "#multi_class=’ovr’, random_state=None)[source]¶\n",
    "#solver:优化算法，可以使用 liblinear/lbfgs/newton-cg/sag\n",
    "#liblinear 适用于适用于L1 、 L2 ，lbfgs/newton-cg/sag 只能用于L2， 另外sag 适用于 大量样本，且使用L2的情况\n",
    "\n",
    "#由于上面的数据分析，看出样本数据分布不均衡，这里class_weight 类别权重设置为 'banlanced' 自动计算类别权重\n",
    "lrcv_L1 = LogisticRegressionCV(Cs=Cs, cv = 5, scoring='neg_log_loss', class_weight='balanced',penalty='l1', solver='liblinear', multi_class='ovr')\n",
    "#样本数据不均衡，还可以在 加样本权重 sample_weight 如：fit(X，y，sample_weight=None)\n",
    "lrcv_L1.fit(X_train, y_train)   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{1: array([[-0.69314718, -0.66302666, -0.53671589, -0.51886271, -0.51733381,\n",
       "         -0.51719533, -0.51718328],\n",
       "        [-0.69314718, -0.67205324, -0.52352149, -0.50250049, -0.5019887 ,\n",
       "         -0.50196153, -0.50195874],\n",
       "        [-0.69314718, -0.66913325, -0.55421596, -0.52720561, -0.52596464,\n",
       "         -0.52586669, -0.52585509],\n",
       "        [-0.69314718, -0.66662476, -0.60248535, -0.60828114, -0.61133342,\n",
       "         -0.61166456, -0.6117037 ],\n",
       "        [-0.69314718, -0.66623927, -0.49835054, -0.47638889, -0.474185  ,\n",
       "         -0.47397367, -0.47395499]])}"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lrcv_L1.scores_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEKCAYAAAA4t9PUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3Xt4XXWd7/H3J2nT+71pm7SFIrRcmxQIxbEMF0UslxRUrFRnRmZUzowy6pkZRzl6jmdQZvQ4o6NzOPMMIl7mcYCCQlsuU0FBLgPaVHsvhdKCTa/pBdpSeknyPX/sFdiEXHaT7Ky9k8/refbTvX/7t1a+6yn0k/Vba/1+igjMzMy6qiTtAszMrLg5SMzMrFscJGZm1i0OEjMz6xYHiZmZdYuDxMzMusVBYmZm3ZLXIJE0V9IGSRslfbGN778taUXyel7SK1nffUzSC8nrY1nt50panezzu5KUz2MwM7OOKV8PJEoqBZ4H3gvUA8uABRGxrp3+fwmcHRF/JmksUAfUAAEsB86NiH2SfgN8FngWeAj4bkQ8nJeDMDOzTg3I475nAxsjYhOApLuAq4E2gwRYAHwlef8+4JGI2Jts+wgwV9LjwMiIeCZp/zFwDdBhkIwfPz6mTZvWrYMxM+tvli9fvjsiyjvrl88gmQxsyfpcD5zfVkdJJwInAb/sYNvJyau+jfYOTZs2jbq6upwLNzMzkPRyLv3yeY2krWsX7Y2jXQfcGxFNnWyb8z4l3SCpTlJdQ0NDp8WamVnX5DNI6oGpWZ+nANva6XsdcGcO29Yn7zvdZ0TcFhE1EVFTXt7pmZmZmXVRPoNkGTBd0kmSysiExeLWnSSdCowBnslqXgpcJmmMpDHAZcDSiNgOHJD0zuRurT8BFuXxGMzMrBN5u0YSEY2SbiQTCqXAHRGxVtLNQF1EtITKAuCuyLp9LCL2SvoqmTACuLnlwjvwF8APgSFkLrL7ji0zsxTl7fbfQlJTUxO+2G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s5kPRT4FQydwm9DPx5RGxNt6qukbQRGATsSZqeLcY70CS9H/gXoBx4BVgREe9Lt6rjI+kK4J95cynqW1IuqUsk3QlcTGam2Z3AVyLi+6kW1QWSLgCeBFaT+X8d4H9ExEPpVdU1kqqAH5H5b6sEWBgRN+ft5zlIzMysOzy0ZWZm3eIgMTOzbnGQmJlZtzhIzMysWxwkZmbWLQ4Ssx4g6WDnvTrc/l5J70jeD5f0b5JeTGZufULS+ZLKkvd+kNgKioPELGWSzgRKI2JT0nQ7mUkQp0fEmcD1wPhkcsdfAB9OpVCzdjhIzHqQMr6ZzAm2WtKHk/YSSf8vOcN4QNJDkq5NNvsosCjpdzJwPvDliGgGSGYIfjDpe3/S36xg+BTZrGd9AJgFVJN50nuZpCeAOcA0YCYwgcwU5Xck28wB7kzen0nmKf2mdva/BjgvL5WbdZHPSMx61gXAncnMqzuBX5H5h/8C4J6IaI6IHcBjWdtUAA257DwJmKPJwktmBcFBYtaz2poevqN2gNeBwcn7tUC1pI7+3xwEHO5CbWZ54SAx61lPAB9OFhUqBy4EfkNmqdMPJtdKJpKZ5LDFeuAUgIh4EagD/i6ZjRZJ01vWYJE0DmiIiGO9dUBmnXGQmPWs+4BVwErgl8DfJkNZPyWzBskaMuvM/xp4NdnmQd4aLJ8AJgEbJa0Gvseba5VcAhTdbLTWt3n2X7NeIml4RBxMzip+A8yJiB3JehGPJZ/bu8jeso+fATcV+Xr11sf4ri2z3vNAsthQGfDV5EyFiHhd0lfIrNn++/Y2ThbAut8hYoXGZyRmZtYtvkZiZmbd4iAxM7NucZCYmVm3OEjMzKxbHCRmZtYtDhIzM+uW/w8MDPIy6cMwBAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23d850a4c88>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#对5次交叉验证的scrores取平均，并画出与log(Cs)的关系图\n",
    "\n",
    "n_Cs = len(Cs)\n",
    "\n",
    "#np.mean 求均值\n",
    "#numpy.mean(a, axis=None, dtype=None, out=None, \n",
    "#keepdims=<class numpy._globals._NoValue at 0x40b6a26c>)\n",
    "#axis= 0 是指对列求均值，如：输入为m*n举证，得到的结果为 1*n\n",
    "#axis= 1 是指对行求均值，如：输入为m*n举证，得到的结果为 m*1\n",
    "mse_mean=-np.mean(lrcv_L1.scores_[1],axis =0)\n",
    "pyplot.plot(np.log10(Cs), mse_mean.reshape(n_Cs,1)) \n",
    "#plt.plot(np.log10(reg.Cs)*np.ones(3), [0.28, 0.29, 0.30])\n",
    "pyplot.xlabel('log(C)')\n",
    "pyplot.ylabel('neg-logloss')\n",
    "pyplot.show()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 0.30558515,  1.04662251, -0.25480072,  0.05646287, -0.15289489,\n",
       "         0.71916038,  0.32051364,  0.2970145 ]])"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#输出w的值，没有零值（没有稀疏解）\n",
    "lrcv_L1.coef_"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## L2正则"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LogisticRegressionCV(Cs=[0.0001, 0.001, 0.01, 0.1, 1, 10, 100, 1000],\n",
       "           class_weight=None, cv=5, dual=False, fit_intercept=True,\n",
       "           intercept_scaling=1.0, max_iter=100, multi_class='ovr',\n",
       "           n_jobs=1, penalty='l2', random_state=None, refit=True,\n",
       "           scoring='roc_auc', solver='liblinear', tol=0.0001, verbose=0)"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.linear_model import LogisticRegressionCV\n",
    "\n",
    "Cs = [0.0001,0.001,0.01,0.1,1, 10,100,1000]\n",
    "#因为是L2 正则，且样本数量较小 solver采用 liblinear;   \n",
    "#lbfgs/newton-cg/sag使用样本数量比较大，支持OvR和MVM\n",
    "lr_cv_L2 = LogisticRegressionCV(Cs=Cs, cv = 5, scoring='roc_auc', penalty='l2', solver='liblinear', multi_class='ovr')\n",
    "lr_cv_L2.fit(X_train, y_train)  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{1: array([[0.74796062, 0.75527426, 0.78227848, 0.80731364, 0.81097046,\n",
       "         0.81125176, 0.81125176, 0.81125176],\n",
       "        [0.84551208, 0.84579977, 0.85788262, 0.85903337, 0.85817031,\n",
       "         0.85788262, 0.85788262, 0.85788262],\n",
       "        [0.81933257, 0.82278481, 0.84033372, 0.84464902, 0.84119678,\n",
       "         0.83918297, 0.83918297, 0.83918297],\n",
       "        [0.79807692, 0.7983683 , 0.79254079, 0.78059441, 0.77418415,\n",
       "         0.77331002, 0.77301865, 0.77301865],\n",
       "        [0.81759907, 0.8219697 , 0.83799534, 0.84324009, 0.84731935,\n",
       "         0.84761072, 0.84761072, 0.84761072]])}"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lr_cv_L2.scores_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZIAAAEKCAYAAAA4t9PUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3Xl8VPW9//HXJ4EkrGEJe0BQUdlRI2r1trUuRYpgra1Sl1LXLtrlh61al1ptbxd/be/1p7UuRSrX5UKtJdelqC2tV+tCkIRNUUCEGJSA7BAgyef3x5zoELKRmZMzk3k/H495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Eesu962YJunOTBYriDWXGuVmS0FHuCTviKnAc+E+xFEDo1m/xVpI2bW1d13BqOK14FT3P2DoF/EguB1YyfZ6/bxZ+DGFO8dLxlGV22JtJ2ngmZDOcAddc3R3H2Pmf2YWH/1dY1tHDSr+otCRFKNRiQiIpIQnSMREZGEKEhERCQhChIREUmIgkRERBKiIBERkYQoSEREJCH/H4CN67GrIwtSAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23d850a4ba8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#对5次交叉验证的scrores取平均，并画出与log(Cs)的关系图\n",
    "\n",
    "n_Cs = len(Cs)\n",
    "\n",
    "#np.mean 求均值\n",
    "#numpy.mean(a, axis=None, dtype=None, out=None, \n",
    "#keepdims=<class numpy._globals._NoValue at 0x40b6a26c>)\n",
    "#axis= 0 是指对列求均值，如：输入为m*n举证，得到的结果为 1*n\n",
    "#axis= 1 是指对行求均值，如：输入为m*n举证，得到的结果为 m*1\n",
    "mse_mean=np.mean(lr_cv_L2.scores_[1],axis =0)\n",
    "pyplot.plot(np.log10(Cs), mse_mean.reshape(n_Cs,1)) \n",
    "#plt.plot(np.log10(reg.Cs)*np.ones(3), [0.28, 0.29, 0.30])\n",
    "pyplot.xlabel('log(C)')\n",
    "pyplot.ylabel('ROC')\n",
    "pyplot.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### C取0.1时,ROC最大，neg_log_loss 评分没有 ROC好"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 0.27228327,  0.92018288, -0.20554148,  0.0550313 , -0.10476091,\n",
       "         0.59168659,  0.25893266,  0.23261786]])"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lr_cv_L2.coef_"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 线性SVM模型训练"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 先使用线性SVC试下"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "#导入工具包\n",
    "from sklearn.metrics import accuracy_score\n",
    "from sklearn.svm import LinearSVC\n",
    "from sklearn import metrics\n",
    "\n",
    "SVC = LinearSVC().fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Classification report for classifier LinearSVC(C=1.0, class_weight=None, dual=True, fit_intercept=True,\n",
      "     intercept_scaling=1, loss='squared_hinge', max_iter=1000,\n",
      "     multi_class='ovr', penalty='l2', random_state=None, tol=0.0001,\n",
      "     verbose=0):\n",
      "             precision    recall  f1-score   support\n",
      "\n",
      "          0       0.84      0.89      0.86       107\n",
      "          1       0.71      0.62      0.66        47\n",
      "\n",
      "avg / total       0.80      0.81      0.80       154\n",
      "\n",
      "\n",
      "Confusion matrix:\n",
      "[[95 12]\n",
      " [18 29]]\n"
     ]
    }
   ],
   "source": [
    "#在测试集上测试，估计模型性能\n",
    "y_predict = SVC.predict(X_test)\n",
    "\n",
    "#打印评分报告\n",
    "print(\"Classification report for classifier %s:\\n%s\\n\"\n",
    "      % (SVC, metrics.classification_report(y_test, y_predict)))\n",
    "#打印混淆矩阵\n",
    "print(\"Confusion matrix:\\n%s\" % metrics.confusion_matrix(y_test, y_predict))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 测试集上分错了30个，加入正则参数看下结果"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 线性SVM正则参数调优"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "####      正则参数调优网格搜索在上面试过了，下面采用老师例子的方式进行参数调优"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [],
   "source": [
    "## 先定义一个函数,老师例子中函数中使用的默认L2正则，这里加入L1正则\n",
    "def fit_grid_point_Linear( C_par, X_train, y_train, X_test, y_test):\n",
    "    #SVC2 = LinearSVC( C = C_par,loss='hinge',dual=True,class_weight='balanced')\n",
    "    #此数据集hinge 损失与默认的squared_hinge 损失，准确率都在 0.77左右\n",
    "    #SVC2 = LinearSVC(C = C_par,dual=True,class_weight='balanced')\n",
    "    #去掉类别权重后，准确率在 0.8左右，\n",
    "    SVC2 = LinearSVC(C = C_par,dual=True)\n",
    "    SVC2 = SVC2.fit(X_train, y_train)\n",
    "#正确率\n",
    "    accuracy = SVC2.score(X_test, y_test)\n",
    "    \n",
    "    print(\"accuracy: {}\".format(accuracy))\n",
    "    return accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "No handles with labels found to put in legend.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy: 0.7922077922077922\n",
      "accuracy: 0.8051948051948052\n",
      "accuracy: 0.7987012987012987\n",
      "accuracy: 0.8051948051948052\n",
      "accuracy: 0.8116883116883117\n",
      "accuracy: 0.7597402597402597\n",
      "accuracy: 0.6493506493506493\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAELCAYAAAAoUKpTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzt3XucVXW9//HXm7vhDRHyAgoGCmjeGtHC1PJGmoBpCpo608U6J04nK09mv45m9ahTeeyip0dU5h0iL0hpIqlpph4ZvCNBiCKjpYhigiK3z++P757DZphhb4dZs/be834+HvvhrLW/a6/PYmR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YdzsnCrH3uA04vbDwzADgCeJi0reUphb6Ld5MW3ms2HxgGEBHPAI3ANwuroCJpePMeHpL6A8siYm1nPZDZljhZmLXPLcATwOPA3cB/FJqdbiLtY/EUad/w/wVeL1xzG5smj08DuwCLJD0J/IKN+118CKi6VVCtdnnVWbMOJmnbiFhZqB08DIyJiH8U9hu4p3DcVsd282fcDHytivcftxrj0VBmHe/3hQ1pegHfKtQ4iIi3JF1E2of7+bYuLmyUNMOJwiqJaxZmZlaS+yzMzKwkJwszMyvJycLMzEpysjAzs5KcLMzMrCQnCzMzK+n/Ayx/OKraQbGWAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23d85408358>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#需要调优的参数\n",
    "C_s = np.logspace(-3, 3, 7)# logspace(a,b,N)把10的a次方到10的b次方区间分成N份  \n",
    "penalty_s = ['l1','l2']\n",
    "\n",
    "accuracy_s = []\n",
    "for i, oneC in enumerate(C_s):\n",
    "    #for j, penalty in enumerate(penalty_s):\n",
    "    tmp = fit_grid_point_Linear(oneC, X_train, y_train, X_test, y_test)\n",
    "    accuracy_s.append(tmp)\n",
    "\n",
    "x_axis = np.log10(C_s)\n",
    "#for j, penalty in enumerate(penalty_s):\n",
    "pyplot.plot(x_axis, np.array(accuracy_s), 'b-')\n",
    "    \n",
    "pyplot.legend()\n",
    "pyplot.xlabel( 'log(C)' )                                                                                                      \n",
    "pyplot.ylabel( 'accuracy' )\n",
    "pyplot.savefig('SVM_Otto.png' )\n",
    "\n",
    "pyplot.show()\n",
    "  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 从上如可看出正则参数C取10效果最好"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用RBF核对数据训练看下结果，并选择最优正则参数"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### RBF核又叫高斯核，此核函数应用较广，无论样本数量多少都有比较好的性能，相对于多项式核函数参数要少"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": [
    "#导入工具包\n",
    "from sklearn.svm import SVC\n",
    "#定义一个交叉验证函数，用来选择最佳正则参数和核函数宽度\n",
    "def fit_grid_point_RBF(C_par, gamma_par, X_train, y_train, X_val, y_val):\n",
    "    #kernel 选择rbf核\n",
    "    SVC3 =  SVC( C = C_par, kernel='rbf', gamma = gamma_par)\n",
    "#    fit(X, y, sample_weight=None) \n",
    "#    SVC 的fit方法可以加入样本权重\n",
    "    SVC3 = SVC3.fit(X_train, y_train)\n",
    "    \n",
    "    # 在测试集上返回accuracy\n",
    "    accuracy = SVC3.score(X_test, y_test)\n",
    "    \n",
    "    print(\"accuracy: {}\".format(accuracy))\n",
    "    return accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "accuracy: 0.6948051948051948\n",
      "accuracy: 0.6948051948051948\n",
      "accuracy: 0.6948051948051948\n",
      "accuracy: 0.6948051948051948\n",
      "accuracy: 0.6948051948051948\n",
      "accuracy: 0.6948051948051948\n",
      "accuracy: 0.7012987012987013\n",
      "accuracy: 0.7857142857142857\n",
      "accuracy: 0.6948051948051948\n",
      "accuracy: 0.7012987012987013\n",
      "accuracy: 0.8181818181818182\n",
      "accuracy: 0.7922077922077922\n",
      "accuracy: 0.7012987012987013\n",
      "accuracy: 0.8181818181818182\n",
      "accuracy: 0.7987012987012987\n",
      "accuracy: 0.7662337662337663\n",
      "accuracy: 0.8116883116883117\n",
      "accuracy: 0.8181818181818182\n",
      "accuracy: 0.7727272727272727\n",
      "accuracy: 0.7337662337662337\n"
     ]
    }
   ],
   "source": [
    "#需要调优的参数\n",
    "C_s = np.logspace(-2, 2, 5)# logspace(a,b,N)把10的a次方到10的b次方区间分成N份 \n",
    "gamma_s = np.logspace(-4, -1, 4)  \n",
    "#经过调整几次C和gamma后发现此数据集，最大accuracy取值在0.81左右\n",
    "accuracy_s = []\n",
    "for i, oneC in enumerate(C_s):\n",
    "    for j, gamma in enumerate(gamma_s):\n",
    "        tmp = fit_grid_point_RBF(oneC, gamma, X_train, y_train, X_test, y_test)\n",
    "        accuracy_s.append(tmp)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEKCAYAAADjDHn2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvNQv5yAAAIABJREFUeJzsnXd4VNXWh989k15Jh5BA6B1CiHSU3nsHUUAFFfWKKCr2i+UTUBHL9epViqBiEEIvAqIoASE0gSAhJCENSK+kzcz+/kiICaRMYCaTSc77PPOQc84ua4aZs87ee+3fElJKFBQUFBQUKkNlagMUFBQUFGo/irNQUFBQUKgSxVkoKCgoKFSJ4iwUFBQUFKpEcRYKCgoKClWiOAsFBQUFhSpRnIWCgoKCQpUozkJBQUFBoUoUZ6GgoKCgUCUWpjbAULi7u0s/Pz9Tm6GgoKBgVpw8eTJZSulRVbk64yz8/PwIDQ01tRkKCgoKZoUQ4qo+5ZRpKAUFBQWFKlGchYKCgoJClRjVWQghhgshLgkhIoQQL5dzvYkQ4pAQ4rQQ4i8hxMji80OEECeFEOeK/x1oTDsVFBQUFCrHaGsWQgg18DkwBIgDTgghtkspw0oVew0IklJ+IYRoD+wG/IBkYIyUMkEI0RHYBzQ2lq0KCgoKCpVjzJFFdyBCShkppSwANgLjbisjAafiv52BBAAp5WkpZULx+QuAjRDC2oi2KigoKChUgjGdRWMgttRxHHeODt4CZgkh4igaVTxTTjuTgNNSyvzbLwgh5gshQoUQoUlJSYaxWkFBQUHhDoz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Vl6HJz0WZmoHZzK3dRu7CwkPXr1zNt2jSD9mtonnjiCVasWFHh9dS8VD544wNGjKhYPXfx4sW8+OKLREREYGdnx9q1a41gqZkQuhqsnaDjpHIvW3p50ujtpTTfvg27++4j6aOPuDJ8BOlbgpFa85CwMAZSStYciaKDtxOBTe9uurMqnK2deT7weXZM2MGQpkO4lnPN6CNexVnUAvbs2UOvXr0ICAhg2rRp5BQrgi5evJj27dvTuXNnXnrpJX7//Xd2797Nc889d1ejklts2LCBTp060bFjR1555RUKExMRajXfbNlC69at6d+/P4899hgLi3dv79+/n/vuuw+1uiia49ixY3Tu3JnevXuzePFi/P39gaKn8n79+tG1a1e6devGn3/+CcCBAwcYMGAAkydPplWrVrz22mt8++233HfffXTu3LnkfcyaNYunnnqKAQMG0KJFCw4fPszs2bNp27Ytjz76aIn98+fPJzAwkA4dOrB06dKS8/3792fv3r1oy7lR5WvzCd4cTPt27WnbtvzFRq1Wy+HDh5kwYQIAs2fPZuvWrXf1GZs9OSlwYSt0mQ5Wledbt27ZEt8v/kOTb9dh4eHBtVdeIWrCRLJ//73WS1gYg6NXUgi/kc2c3lWHy94rjR0a83/9/o/3+r5n1H4A6mZsZDn8e8cFwhIyDdpme28n3hxzb2k4ExMTef/99zl48CB2dna8++67rFq1ikcffZTdu3dz4cIFhBCkp6fToEEDRo4cyeTJkxl/lxnr4uLieO211wgNDcXZ2ZlBAwaws3Fjuvbpw7Llyzl16hT29vb079+f7t27A3DkyBG6detW0sbcuXNZt24d3bt354UXXig536hRI/bv34+NjQ1///03s2fPLnEYZ8+e5eLFizg7O+Pn58eCBQs4ceIEH374IZ999hkffPABABkZGRw6dIjNmzczZswYjh49Stu2bQkICOD8+fN07NiR999/H1dXVzQaTYkTat++PWq1Gj8/P86fP0+X23aexybFsu6Ldfx68Fc+WP5BuZ9NUlIS7u7uJU7Rx8eH+Pj4u/qczZ6z34M2H7rN1buKfffu+AX9SNbevSR+tJLYefOx69UTzxdewLaDeaWrvRfWhETjam/FmC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E4AWsF3C3AYv9j5mAdHQwwDdhgjPEO8fyfAV+1JblSR0D3LJQ6Ml/DWqXVa4w5APwD6839a8AyY4zPGLMfa+mMXrlAdTBP7i8iXb1rgCnlNC0WSh2ZoU5YdLgTGbVjrQ0F1tpC00XkcP+DCUDHEWRTasRpsVDqyLwLXCsisSKSg3Uqzg+Bf2GdRChGRMZinYKz1xZgEoCxzqVRCvxXnxVMJ4vIZf7rHqDaGNMdqh9IqcPRYqHUkXkJa/XPT4C3gH/3dzu9gLVS6WfAH7DOZNbof8wq+hePb2Od1GmbiGzEOo9E77kH5gKv2fsjKBU8XXVWqREmIinGOouaB2tvY44xZr+IJGGNYcw5zMB273O8CHzfhOH52FV00tlQSo28V0UkA4gHfurf48AY0y4iP8E6J/LuoR7sP0HRCi0UKpzonoVSSqmAdMxCKaVUQFoslFJKBaTFQimlVEBaLJRSSgWkxUIppVRAWiyUUkoF9P8BdehfhXCURYkAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x23d854bdb38>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "accuracy_s1 =np.array(accuracy_s).reshape(len(C_s),len(gamma_s))\n",
    "x_axis = np.log10(C_s)\n",
    "for j, gamma in enumerate(gamma_s):\n",
    "    pyplot.plot(x_axis, np.array(accuracy_s1[:,j]), label = ' Test - log(gamma)' + str(np.log10(gamma)))\n",
    "\n",
    "pyplot.legend()\n",
    "pyplot.xlabel( 'log(C)' )                                                                                                      \n",
    "pyplot.ylabel( 'accuracy' )\n",
    "pyplot.savefig('RBF_SVM_Otto.png' )\n",
    "\n",
    "pyplot.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 由上图可看出在C=1，gamma=0.01和C=10，gamma=0.001时准确率最高"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Logistic 与SVM 对比\n",
    "Logistic回归的性能对大数据量SVM的性能好点，SVM可以处理线性和非线性问题，大多数情况会比LR要高，但是模型较大，训练效率低，\n",
    "网上提供的选用技巧：\n",
    "1. 如果Feature的数量很大，跟样本数量差不多，这时候选用LR或者是Linear Kernel的SVM\n",
    "2. 如果Feature的数量比较小，样本数量一般，不算大也不算小，选用SVM+Gaussian Kernel\n",
    "3. 如果Feature的数量比较小，而样本数量很多，需要手工添加一些feature变成第一种情况\n",
    "另外一篇介绍SVM和logistic算法比较的文章地址：https://www.cnblogs.com/shadowwalker9/p/6076360.html （记在这里）\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
